#include "Common.hpp"
#include "Server.hpp"

int main()
{

    server.OpenPipe(gForRead);

    while (true)
    {
        std::string str;
        int n = server.RecvPipe(&str);
        if (n < 0)
        {
            std::cerr << "recv error" << std::endl;
        }
        else if (n == 0)
        {
            break;
        }
        else
        {
        }
        std::cout << "Client:" << str << std::endl;
    }
    std::cout << "client quit, me too!" << std::endl;

    server.ClosePipe();

    return 0;
}
